﻿package Message.Game
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SPlayer extends IMessageBase
    {
        public var playerId:int;
        public var username:String;
        public var name:String;
        public var sex:int;
        public var camp:int;
        public var createDt:Date;
        public var flag:int;
        public var mode:int;
        public var status:int;
        public var issm:int;
        public var VIP:int;
        public var headCode:int;
        public var signature:String;
        public var lastLoginDt:Date;
        public var onlineDays:int;
        public var onlineTime:int;
        public var offlineTime:int;
        public var guildId:int;
        public const _type:int = 15001;
        public static var _regist:SPlayer = new SPlayer(true);

        public function SPlayer(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            return;
        }// end function

        override public function getType() : int
        {
            return this._type;
        }// end function

        override public function clone() : IMessageBase
        {
            return new SPlayer();
        }// end function

        override public function __write(param1:SerializeStream) : void
        {
            param1.writeInt(this.playerId);
            param1.writeString(this.username);
            param1.writeString(this.name);
            param1.writeByte(this.sex);
            param1.writeInt(this.camp);
            param1.writeDate(this.createDt);
            param1.writeInt(this.flag);
            param1.writeInt(this.mode);
            param1.writeInt(this.status);
            param1.writeInt(this.issm);
            param1.writeShort(this.VIP);
            param1.writeInt(this.headCode);
            param1.writeString(this.signature);
            param1.writeDate(this.lastLoginDt);
            param1.writeInt(this.onlineDays);
            param1.writeInt(this.onlineTime);
            param1.writeInt(this.offlineTime);
            param1.writeInt(this.guildId);
            return;
        }// end function

        override public function __read(param1:SerializeStream) : void
        {
            this.playerId = param1.readInt();
            this.username = param1.readString();
            this.name = param1.readString();
            this.sex = param1.readByte();
            this.camp = param1.readInt();
            this.createDt = param1.readDate();
            this.flag = param1.readInt();
            this.mode = param1.readInt();
            this.status = param1.readInt();
            this.issm = param1.readInt();
            this.VIP = param1.readShort();
            this.headCode = param1.readInt();
            this.signature = param1.readString();
            this.lastLoginDt = param1.readDate();
            this.onlineDays = param1.readInt();
            this.onlineTime = param1.readInt();
            this.offlineTime = param1.readInt();
            this.guildId = param1.readInt();
            return;
        }// end function

    }
}
